// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'ProductProcessReportId',
        footer: "Foots",
        cnName: '工序报工记录',
        name: 'ProductProcessReport',
        newTabEdit: false,
        url: "/ProductProcessReport/",
        sortName: "ProductProcessReportId",
        fixedSearch:false
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"BillNo":"","BillDate":"","ProductProcessNo":"","ProductProcessName":"","ProductProcessTypeId":"","DepartmentId":[],"ReportWorkTypeId":"","GroupId":"","WorkerId":[],"WorkHourPrice":"","WorkQtyPrice":"","PriceTypeId":"","WaitReportQty":"","ReportQty":"","QualifyQty":"","UnQualifyQty":"","ScrapQty":"","WorkHourAccount":"","IsChecked":""};
    const editFormOptions = [[{"title":"工序汇报单号","field":"BillNo","readonly":true,"type":"text"},
                               {"title":"工序汇报日期","required":true,"field":"BillDate","type":"date"},
                               {"dataKey":"工序信息","data":[],"title":"工序编码","field":"ProductProcessNo","readonly":true,"type":"select"}],
                              [{"title":"工序名称","field":"ProductProcessName","readonly":true,"type":"text"},
                               {"dataKey":"工序类型","data":[],"title":"工序类型","field":"ProductProcessTypeId","readonly":true,"type":"select"},
                               {"dataKey":"部门级联","data":[],"title":"部门","required":true,"field":"DepartmentId","type":"cascader"}],
                              [{"dataKey":"报工方式","data":[],"title":"报工方式","field":"ReportWorkTypeId","readonly":true,"type":"select"},
                               {"dataKey":"班组信息","data":[],"title":"班组","field":"GroupId","type":"select"},
                               {"dataKey":"职员","data":[],"title":"作业人员","field":"WorkerId","type":"selectList"}],
                              [{"title":"计时单价","required":true,"field":"WorkHourPrice","type":"decimal"},
                               {"title":"计件单价","required":true,"field":"WorkQtyPrice","type":"decimal"},
                               {"dataKey":"计价方式","data":[],"title":"计价方式","required":true,"field":"PriceTypeId","type":"select"}],
                              [{"title":"待汇报数量","field":"WaitReportQty","readonly":true,"type":"decimal"},
                               {"title":"汇报数量","required":true,"field":"ReportQty","type":"decimal"},
                               {"title":"合格数量","field":"QualifyQty","type":"decimal"}],
                              [{"title":"不合格数量","field":"UnQualifyQty","type":"decimal"},
                               {"title":"报废数量","field":"ScrapQty","type":"decimal"},
                               {"title":"工时","required":true,"field":"WorkHourAccount","type":"decimal"}],
                              [{"dataKey":"是否","data":[],"title":"是否质检","required":true,"field":"IsChecked","type":"select"}]];
    const searchFormFields = {};
    const searchFormOptions = [];
    const columns = [{field:'ProductProcessReportId',title:'生产工序汇报标识',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'ProductTaskId',title:'生产任务单',type:'int',bind:{ key:'生产任务单编号',data:[]},width:80,align:'left'},
                       {field:'ProductAssignId',title:'作业任务单标识',type:'int',width:110,hidden:true,align:'left'},
                       {field:'ProductNoticeId',title:'生产通知标识',type:'int',width:110,hidden:true,align:'left'},
                       {field:'ProductTaskProcessId',title:'生产任务明细标识',type:'int',width:110,hidden:true,align:'left'},
                       {field:'AssignNo',title:'作业任务单号',type:'string',width:110,readonly:true,align:'left'},
                       {field:'AssignDate',title:'作业任务日期',type:'datetime',width:110,readonly:true,align:'left'},
                       {field:'BillNo',title:'工序汇报单号',type:'string',link:true,width:110,readonly:true,align:'left'},
                       {field:'BillDate',title:'工序汇报日期',type:'datetime',width:110,require:true,align:'left'},
                       {field:'ProductProcessId',title:'工序标识',type:'int',width:110,hidden:true,align:'left'},
                       {field:'ProductProcessNo',title:'工序编码',type:'string',bind:{ key:'工序信息',data:[]},width:110,readonly:true,align:'left'},
                       {field:'ProductProcessName',title:'工序名称',type:'string',width:110,readonly:true,align:'left'},
                       {field:'ProductProcessTypeId',title:'工序类型',type:'int',bind:{ key:'工序类型',data:[]},width:110,readonly:true,align:'left'},
                       {field:'DepartmentId',title:'部门',type:'guid',bind:{ key:'部门级联',data:[]},width:110,require:true,align:'left'},
                       {field:'ReportWorkTypeId',title:'报工方式',type:'int',bind:{ key:'报工方式',data:[]},width:110,readonly:true,align:'left'},
                       {field:'GroupId',title:'班组',type:'int',bind:{ key:'班组信息',data:[]},width:110,align:'left'},
                       {field:'WorkerId',title:'作业人员',type:'string',bind:{ key:'职员',data:[]},width:110,align:'left'},
                       {field:'WaitReportQty',title:'待汇报数量',type:'decimal',width:110,readonly:true,align:'left'},
                       {field:'ReportQty',title:'汇报数量',type:'decimal',width:110,require:true,align:'left'},
                       {field:'QualifyQty',title:'合格数量',type:'decimal',width:110,align:'left'},
                       {field:'UnQualifyQty',title:'不合格数量',type:'decimal',width:110,align:'left'},
                       {field:'ScrapQty',title:'报废数量',type:'decimal',width:110,align:'left'},
                       {field:'WorkHourAccount',title:'工时',type:'decimal',width:110,require:true,align:'left'},
                       {field:'IsChecked',title:'是否质检',type:'int',bind:{ key:'是否',data:[]},width:80,require:true,align:'left'},
                       {field:'IsLasted',title:'是否末道工序',type:'int',bind:{ key:'是否',data:[]},width:80,require:true,align:'left'},
                       {field:'CreateID',title:'创建人标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人名称',type:'string',width:100,align:'left'},
                       {field:'CreateDate',title:'创建日期',type:'datetime',width:110,align:'left'},
                       {field:'ModifyID',title:'修改人标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人名称',type:'string',width:100,align:'left'},
                       {field:'ModifyDate',title:'修改日期',type:'datetime',width:110,align:'left'},
                       {field:'AuditDate',title:'审核日期',type:'datetime',width:110,align:'left'},
                       {field:'AuditStatus',title:'审核状态',type:'int',width:110,align:'left'},
                       {field:'AuditId',title:'审核人标识',type:'int',width:110,align:'left'},
                       {field:'Auditor',title:'审核人',type:'string',width:120,align:'left'},
                       {field:'WorkHourPrice',title:'计时单价',type:'decimal',width:110,require:true,align:'left'},
                       {field:'WorkQtyPrice',title:'计件单价',type:'decimal',width:110,require:true,align:'left'},
                       {field:'PriceTypeId',title:'计价方式',type:'int',bind:{ key:'计价方式',data:[]},width:80,require:true,align:'left'}];
    const detail =  {
                    cnName: '作业汇报',
                    table: 'WorkHourReport',
                    columns: [{field:'WorkHourReportId',title:'作业工时标识',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'ProductProcessReportId',title:'工序汇报标识',type:'int',width:110,hidden:true,require:true,align:'left'},
                       {field:'WorkerId',title:'作业人员',type:'int',bind:{ key:'职员',data:[]},width:110,edit:{type:'select'},require:true,align:'left'},
                       {field:'WorkHour',title:'计时',type:'decimal',width:110,edit:{type:'decimal'},align:'left'},
                       {field:'WorkQty',title:'件数',type:'decimal',width:110,edit:{type:'decimal'},align:'left'},
                       {field:'WorkHourPrice',title:'计时单价',type:'decimal',width:110,align:'left'},
                       {field:'WorkQtyPrice',title:'计件单价',type:'decimal',width:110,align:'left'},
                       {field:'WorkRate',title:'占比',type:'decimal',width:110,edit:{type:'decimal'},require:true,align:'left'}],
                    sortName: 'WorkHourReportId',
                    key: 'WorkHourReportId'
                                            };
    const details = [];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}